import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "*",
    redirect: "/",
  },
  {
    path: "/",
    name: "index",
    component: () =>
      import(/* webpackChunkName: "about" */ "@/views/index.vue"),
  },
  {
    path: "/detail",
    name: "detail",
    component: () => import("@/views/shopDetail"),
  },
  {
    path: "/order-detail",
    name: "order-detail",
    component: () => import("@/views/orderDetail"),
  },
  {
    path: "/order-status",
    name: "order-status",
    component: () => import("@/views/orderDetail/orderStatus"),
  },
  {
    path: "/404",
    component: () => import("@/views/error/404"),
    hidden: true,
  },
  {
    path: "/401",
    component: () => import("@/views/error/401"),
    hidden: true,
  },
];

const router = new VueRouter({
  mode: "history",
  base: "/h5",
  routes,
});

export default router;
